package Demo3;


 class Person{
     String name;
     int age;

     public Person(String name, int age) {
         this.name = name;
         this.age = age;
     }

     @Override
     public String toString() {
         return "person{" +
                 "name='" + name + '\'' +
                 ", age=" + age +
                 '}';
     }
 }
public class Text {
    public static void main(String[] args) {
        Person p1 = new Person("张三",18);
        System.out.println(p1.age);
        System.out.println(p1.age);

    }
}
